.class Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;
.super Landroid/os/AsyncTask;
.source "PullToRefreshLayout.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lmyview/PullToRefreshLayout;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "AutoRefreshAndLoadTask"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Ljava/lang/Integer;",
        "Ljava/lang/Float;",
        "Ljava/lang/String;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lmyview/PullToRefreshLayout;


# direct methods
.method private constructor <init>(Lmyview/PullToRefreshLayout;)V
    .locals 0

    .prologue
    .line 511
    iput-object p1, p0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->this$0:Lmyview/PullToRefreshLayout;

    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lmyview/PullToRefreshLayout;Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;)V
    .locals 0

    .prologue
    .line 511
    invoke-direct {p0, p1}, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;-><init>(Lmyview/PullToRefreshLayout;)V

    return-void
.end method


# virtual methods
.method protected bridge varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1

    .prologue
    .line 1
    check-cast p1, [Ljava/lang/Integer;

    invoke-virtual {p0, p1}, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->doInBackground([Ljava/lang/Integer;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method protected varargs doInBackground([Ljava/lang/Integer;)Ljava/lang/String;
    .locals 5
    .param p1, "params"    # [Ljava/lang/Integer;

    .prologue
    const/4 v4, 0x0

    .line 518
    :goto_0
    iget-object v1, p0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->this$0:Lmyview/PullToRefreshLayout;

    iget v1, v1, Lmyview/PullToRefreshLayout;->pullDownY:F

    const/high16 v2, 0x3f800000    # 1.0f

    iget-object v3, p0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->this$0:Lmyview/PullToRefreshLayout;

    # getter for: Lmyview/PullToRefreshLayout;->refreshDist:F
    invoke-static {v3}, Lmyview/PullToRefreshLayout;->access$3(Lmyview/PullToRefreshLayout;)F

    move-result v3

    mul-float/2addr v2, v3

    cmpg-float v1, v1, v2

    if-ltz v1, :cond_0

    .line 530
    const/4 v1, 0x0

    return-object v1

    .line 520
    :cond_0
    iget-object v1, p0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->this$0:Lmyview/PullToRefreshLayout;

    iget v2, v1, Lmyview/PullToRefreshLayout;->pullDownY:F

    iget-object v3, p0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->this$0:Lmyview/PullToRefreshLayout;

    iget v3, v3, Lmyview/PullToRefreshLayout;->MOVE_SPEED:F

    add-float/2addr v2, v3

    iput v2, v1, Lmyview/PullToRefreshLayout;->pullDownY:F

    .line 521
    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/Float;

    iget-object v2, p0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->this$0:Lmyview/PullToRefreshLayout;

    iget v2, v2, Lmyview/PullToRefreshLayout;->pullDownY:F

    invoke-static {v2}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;

    move-result-object v2

    aput-object v2, v1, v4

    invoke-virtual {p0, v1}, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->publishProgress([Ljava/lang/Object;)V

    .line 524
    const/4 v1, 0x0

    :try_start_0
    aget-object v1, p1, v1

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    int-to-long v1, v1

    invoke-static {v1, v2}, Ljava/lang/Thread;->sleep(J)V
    :try_end_0
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 525
    :catch_0
    move-exception v0

    .line 527
    .local v0, "e":Ljava/lang/InterruptedException;
    invoke-virtual {v0}, Ljava/lang/InterruptedException;->printStackTrace()V

    goto :goto_0
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0

    .prologue
    .line 1
    check-cast p1, Ljava/lang/String;

    invoke-virtual {p0, p1}, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->onPostExecute(Ljava/lang/String;)V

    return-void
.end method

.method protected onPostExecute(Ljava/lang/String;)V
    .locals 2
    .param p1, "result"    # Ljava/lang/String;

    .prologue
    .line 536
    iget-object v0, p0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->this$0:Lmyview/PullToRefreshLayout;

    const/4 v1, 0x2

    # invokes: Lmyview/PullToRefreshLayout;->changeState(I)V
    invoke-static {v0, v1}, Lmyview/PullToRefreshLayout;->access$8(Lmyview/PullToRefreshLayout;I)V

    .line 538
    iget-object v0, p0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->this$0:Lmyview/PullToRefreshLayout;

    # getter for: Lmyview/PullToRefreshLayout;->mListener:Lmyview/PullToRefreshLayout$OnRefreshListener;
    invoke-static {v0}, Lmyview/PullToRefreshLayout;->access$10(Lmyview/PullToRefreshLayout;)Lmyview/PullToRefreshLayout$OnRefreshListener;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 539
    iget-object v0, p0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->this$0:Lmyview/PullToRefreshLayout;

    # getter for: Lmyview/PullToRefreshLayout;->mListener:Lmyview/PullToRefreshLayout$OnRefreshListener;
    invoke-static {v0}, Lmyview/PullToRefreshLayout;->access$10(Lmyview/PullToRefreshLayout;)Lmyview/PullToRefreshLayout$OnRefreshListener;

    move-result-object v0

    iget-object v1, p0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->this$0:Lmyview/PullToRefreshLayout;

    invoke-interface {v0, v1}, Lmyview/PullToRefreshLayout$OnRefreshListener;->onRefresh(Lmyview/PullToRefreshLayout;)V

    .line 540
    :cond_0
    iget-object v0, p0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->this$0:Lmyview/PullToRefreshLayout;

    # invokes: Lmyview/PullToRefreshLayout;->hide()V
    invoke-static {v0}, Lmyview/PullToRefreshLayout;->access$11(Lmyview/PullToRefreshLayout;)V

    .line 541
    return-void
.end method

.method protected varargs onProgressUpdate([Ljava/lang/Float;)V
    .locals 2
    .param p1, "values"    # [Ljava/lang/Float;

    .prologue
    .line 546
    iget-object v0, p0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->this$0:Lmyview/PullToRefreshLayout;

    iget v0, v0, Lmyview/PullToRefreshLayout;->pullDownY:F

    iget-object v1, p0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->this$0:Lmyview/PullToRefreshLayout;

    # getter for: Lmyview/PullToRefreshLayout;->refreshDist:F
    invoke-static {v1}, Lmyview/PullToRefreshLayout;->access$3(Lmyview/PullToRefreshLayout;)F

    move-result v1

    cmpl-float v0, v0, v1

    if-lez v0, :cond_0

    .line 547
    iget-object v0, p0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->this$0:Lmyview/PullToRefreshLayout;

    const/4 v1, 0x1

    # invokes: Lmyview/PullToRefreshLayout;->changeState(I)V
    invoke-static {v0, v1}, Lmyview/PullToRefreshLayout;->access$8(Lmyview/PullToRefreshLayout;I)V

    .line 548
    :cond_0
    iget-object v0, p0, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->this$0:Lmyview/PullToRefreshLayout;

    invoke-virtual {v0}, Lmyview/PullToRefreshLayout;->requestLayout()V

    .line 549
    return-void
.end method

.method protected bridge varargs synthetic onProgressUpdate([Ljava/lang/Object;)V
    .locals 0

    .prologue
    .line 1
    check-cast p1, [Ljava/lang/Float;

    invoke-virtual {p0, p1}, Lmyview/PullToRefreshLayout$AutoRefreshAndLoadTask;->onProgressUpdate([Ljava/lang/Float;)V

    return-void
.end method
